module BlogsHelper

  # 格式化时间
  def get_formatting_time time

    type = time.strftime('%Y-%m-%d') unless time.blank?

    return type if type != nil
  end

  def get_blog_show_content(content)
    unless content.nil?
      content.length > 500 ? "#{content[0..510]}..." : content
    end
  end
end
